Many conventional image and video coding standards employ a block-wise approach. For example, the JPEG image coding standard is based on block-wise discrete cosine transform (DCT) and quantization. Similarly, most, if not all, existing so far video coding standards are based on block-wise approach to compression and coding of video images, and utilize block-wise motion compensation (MC), DCT, and quantization. For example, MPEG-1, MPEG-2, H.261, and H.263 use 8×8 blocks of pixels for DCT, while more recent standards H.264 and MPEG-4 AVC may use blocks as small as 4×4 pixels.
As an inherent shortcoming of the block-wise processing and quantization, the block-wise coding approach introduces discontinuities at block boundaries, especially when the quantization level is high. The discontinuities appear as blocking artifacts to which the human visual system is very sensitive.
A recent and improved video coding standard, H.264/AVC, which evolved from previous video coding standards (H.261, H.262, H.263), can achieve the same picture quality as MPEG-2 at about half the bit rate. Currently H.264/AVC has become a component of the new generation of DVD formats and many other applications such as mobile TV. One of its principal features is the integer discrete cosine transform (DCT), operating on blocks of 4×4 or 8×8 pixels. This transform can be computed using integer arithmetic and thus leads to a significant complexity reduction with negligible impact on the picture quality. The transform coefficients are quantized and coded to achieve compression. Quantization is a lossy operation where the amount of information lost depends on the quantization parameter QP which is related to the quantification step size.
Due to this loss of information, blocking artifacts appear at the boundaries of the 4×4 coding blocks. For this reason, H.264/AVC includes an adaptive deblocking filter that is applied to coded image data after block-wise decoding to improve the picture quality. The strength of this deblocking filter depends upon the quantization parameter QP, so that stronger deblocking filtering is used in the case of more coarse quantization. The deblocking filter first detects discontinuities at block boundaries and then determines the appropriate strength for the filter according to QP, the discontinuities, and the coding modes of neighboring blocks. As described in further detail, for example, in I. E. G. Richardson, H.264 and MPEG-4 Video Compression: Video Coding for Next-generation Multimedia, John Wiley & Sons, 2003, H.264/AVC utilizes a parameter Bs to indicate the strength of the required filter, with a value ranging from 0 to 4. For instance, Bs=4 means the strongest filter is used whereas Bs=0 indicates that no filtering operation is applied. Accordingly, the deblocking algorithm of H.264/AVC may select from a set of 4 filters of different strength to apply at each particular block boundary.
However, there is still visible distortion after the filtering when compared to the original video. This remaining distortion indicates that the ability of prior art filters to adapt to various cross-block patterns appearing in decoded images is insufficient. Therefore, it is important to find an effective method to reduce the blocking artifacts and improve the picture quality without any significant sacrifice in the compression capability of the coding approach.
Therefore an object of the present invention is to overcome at least some of the shortcomings of the prior art by providing an efficient method and system for adaptive deblocking filtering of decoded still and video images in block-wise image and video encoding.